let cloudUrl = "http://localhost:3000"
function getData(url,options) {
	return new Promise((resolve,reject)=>{
		uni.request({
			url: cloudUrl + url,
			data: options,
			success:res=>{
				resolve(res.data)
			}
		})
	})
}

// 获取榜单内容摘要
let = getAbstract = options => getData("/toplist/detail",options)
// 获取搜索关键词
let = getSearch = options => getData("/cloudsearch",options)
// 获取热搜列表
let = getSearchHot = options => getData("/search/hot/detail",options)

module.exports = {
	getAbstract,
	getSearch,
	getSearchHot
}